/**
 * Sooying.cn Inc.
 * Copyright (c) 2010-2015 All Rights Reserved.
 */
package com.dundun.SSO.core.base;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
 * 
 * @author xuyy
 * @version $Id: BaseException.java, v0.1 2015年12月8日 下午4:01:45 xuyy Exp $
 */
public class BaseException extends Exception {
    /**  */
    private static final long serialVersionUID = 8504081029398007217L;

    /** 异常码 **/
    private String            resultCode       = "UN_KNOWN_EXCEPTION";

    /** 异常描述 **/
    private String            resultMsg        = "未知异常";

    /**
     * 
     * 默认的构造方法 Copyright (c) 2004-2015 All Rights Reserved.
     */
    public BaseException() {
        super();
    }

    /**
     * 
     * @param resultCode
     * @param resultMsg
     * 
     *            Copyright (c) 2004-2015 All Rights Reserved.
     */
    public BaseException(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    /**
     * 
     * @param resultMsg
     *            Copyright (c) 2004-2015 All Rights Reserved.
     */
    public BaseException(String resultMsg) {
        this.resultMsg = resultMsg;
    }

    /**
     * Getter method for property <tt>resultCode</tt>.
     * 
     * @return property value of resultCode
     */
    public String getResultCode() {
        return resultCode;
    }

    /**
     * Setter method for property <tt>resultCode</tt>.
     * 
     * @param resultCode
     *            value to be assigned to property resultCode
     */
    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    /**
     * Getter method for property <tt>resultMsg</tt>.
     * 
     * @return property value of resultMsg
     */
    public String getResultMsg() {
        return resultMsg;
    }

    /**
     * Setter method for property <tt>resultMsg</tt>.
     * 
     * @param resultMsg
     *            value to be assigned to property resultMsg
     */
    public void setResultMsg(String resultMsg) {
        this.resultMsg = resultMsg;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }

}
